// 通知管理接口
// 
import { title } from '@/settings'
import request from '@/utils/request'

export function list(page, pageNum) {
    return request({
        url: '/admin/notice/list?page='+page+'&limit='+pageNum+'&sort=add_time&order=desc',
        method: 'get',
    })
}
//添加接口
export function add(content, title) {
    return request({
        url: '/admin/notice/create',
        method: 'post',
        data:{
            content:content,
            title:title,
        }
    })
}
//编辑接口
export function addok(addTime, adminId,content,deleted,id,title,updateTime) {
    return request({
        url: '/admin/notice/update',
        method: 'post',
        data:{
            addTime:addTime,
            adminId:adminId,
            content:content,
            deleted:deleted,
            id:id,
            title:title,
            updateTime:updateTime,
        }
    })
}
//查找接口
export function sele(page,pageNum,title,content) {
    return request({
        url: '/admin/notice/list?page='+page+'&limit='+pageNum+'&title='+title+'&content='+content+'&sort=add_time&order=desc',
        method: 'get',
    })
}
//批量删除接口
export function deles(ids) {
    return request({
        url: '/admin/notice/batch-delete',
        method: 'post',
        data:{
            ids:ids
        }
    })
}
//删除接口
export function dele(addTime,adminId,content,deleted,id,title,updateTime) {
    return request({
        url: '/admin/notice/delete',
        method: 'post',
        data:{
            addTime:addTime,
            adminId:adminId,
            content:content,
            deleted:deleted,
            id:id,
            title:title,
            updateTime:updateTime,
        }
    })
}